CC	:= gcc
CCFLAGS	:= -std=c11 -fPIC -Isrc -I./godot_headers/ 
LDFLAGS := -rdynamic -shared -pthread -lmodbus 

OBJ	:= src/simple.o
TARGETS := simple/bin/libsimple.so
LIBS	:= 

.PHONY: all

all: $(TARGETS)

$(OBJ): %.o : %.c 
	$(CC) -c -o $@ $< $(CCFLAGS)

$(TARGETS): % : $(OBJ)
	$(CC) -o $@ $(LIBS) $^ $(CCFLAGS) $(LDFLAGS)

